<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Send an email message</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.imap-mail-move.html">imap_mail_move</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.imap-mailboxmsginfo.html">imap_mailboxmsginfo</a></div>
 <div class="up"><a href="ref.imap.html">IMAP 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.imap-mail" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">imap_mail</h1>
  <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">imap_mail</span> &mdash; <span class="dc-title">Send an email message</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.imap-mail-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">bool</span> <span class="methodname"><strong>imap_mail</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$to</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$subject</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$message</code></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$additional_headers</code><span class="initializer"> = <strong><code>NULL</code></strong></span></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$cc</code><span class="initializer"> = <strong><code>NULL</code></strong></span></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$bcc</code><span class="initializer"> = <strong><code>NULL</code></strong></span></span>
   [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$rpath</code><span class="initializer"> = <strong><code>NULL</code></strong></span></span>
  ]]]] )</div>

  <p class="para rdfs-comment">
   This function allows sending of emails with correct handling of
   Cc and Bcc receivers. 
  </p>
  <p class="para">
   The parameters <em><code class="parameter">to</code></em>, <em><code class="parameter">cc</code></em>
   and <em><code class="parameter">bcc</code></em> are all strings and are all parsed
   as <a href="http://www.faqs.org/rfcs/rfc822" class="link external">&raquo;&nbsp;RFC822</a> address lists.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.imap-mail-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">to</code></em></dt>

     <dd>

      <p class="para">
       The receiver
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">subject</code></em></dt>

     <dd>

      <p class="para">
       The mail subject
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">message</code></em></dt>

     <dd>

      <p class="para">
       The mail body, see <span class="function"><a href="function.imap-mail-compose.html" class="function">imap_mail_compose()</a></span>
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">additional_headers</code></em></dt>

     <dd>

      <p class="para">
       As string with additional headers to be set on the mail
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">cc</code></em></dt>

     <dd>

      <p class="para">
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">bcc</code></em></dt>

     <dd>

      <p class="para">
       The receivers specified in <em><code class="parameter">bcc</code></em> will get the
       mail, but are excluded from the headers.
      </p>
     </dd>

    
    
     <dt>
<em><code class="parameter">rpath</code></em></dt>

     <dd>

      <p class="para">
       Use this parameter to specify return path upon mail delivery failure.
       This is useful when using PHP as a mail client for multiple users.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.imap-mail-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   成功时返回 <strong><code>TRUE</code></strong>， 或者在失败时返回 <strong><code>FALSE</code></strong>。
  </p>
 </div>

 <div class="refsect1 seealso" id="refsect1-function.imap-mail-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.mail.html" class="function" rel="rdfs-seeAlso">mail()</a> - 发送邮件</span></li>
    <li class="member"><span class="function"><a href="function.imap-mail-compose.html" class="function" rel="rdfs-seeAlso">imap_mail_compose()</a> - Create a MIME message based on given envelope and body sections</span></li>
   </ul>
  </p>
 </div>

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.imap-mail-move.html">imap_mail_move</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.imap-mailboxmsginfo.html">imap_mailboxmsginfo</a></div>
 <div class="up"><a href="ref.imap.html">IMAP 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
